all: seq-rb mt-rb dist-rb

seq-rb: seq-rb.o
	gcc seq-rb.o -o seq-rb

seq-rb.o: seq-rb.c
	gcc -c -O2 seq-rb.c

mt-rb: mt-rb.o
	gcc mt-rb.o -o mt-rb -lpthread -lm 

mt-rb.o: mt-rb.c
	gcc -c  -O2 mt-rb.c  

dist-rb: dist-rb.o
	mpicc dist-rb.o -o dist-rb

dist-rb.o: dist-rb.c
	mpicc -c -O2 dist-rb.c

clean:
	rm -rf *o seq-rb mt-rb dist-rb
